package com.lagou.kafka.demo.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @param
 * @author oyz
 * @version 1.0.4
 * @description: kafka配置类
 * @date 2022/6/1 21:31
 */
@Configuration
public class KafkaConfig {


    @Bean
    public NewTopic topic1(){
        return new NewTopic("nptc-01",3, (short) 1);
    }

    @Bean
    public NewTopic topic2(){
        return new NewTopic("nptc-02",5,(short)1);
    }

}
